#include<stdio.h>

int convert(char *c, int status){
	if(*c == ' '){
		return 1;
	}else{
		if(status && *c >= 'a' && *c <= 'z'){
			*c += 'A'-'a';
		}
		return 0;
	}
}

int main(){
	char str[] = "this is a teacher!";
	int flag = 1;
	char *p = str;
	while(*p !='\0'){
		flag = convert(p,flag);
		printf("%c", *p);
		p++;
	}
	printf("\n");

	return 0;
}
